﻿using System.ComponentModel.DataAnnotations;

namespace Shp.Web.Models.Domain
{
    [MetadataType(typeof (Metadata))]
    public partial class Customer
    {
        #region Metadata

        /// <summary>
        /// Metadata internal class used for Data Annotations
        /// </summary>
        internal class Metadata
        {
            [Display(Name = "Customer Id")]
            [Required(ErrorMessage = "Customer Id is Required.")]
            public virtual int CustomerId { get; set; }

            [Display(Name = "First Name")]
            [Required(ErrorMessage = "First Name is Required.")]
            [StringLength(40, ErrorMessage = "First Name must be under 40 characters.")]
            public virtual string FirstName { get; set; }

            [Display(Name = "Last Name")]
            [Required(ErrorMessage = "Last Name is Required.")]
            [StringLength(20, ErrorMessage = "Last Name must be under 20 characters.")]
            public virtual string LastName { get; set; }

            [Display(Name = "Company")]
            [StringLength(80, ErrorMessage = "Company must be under 80 characters.")]
            public virtual string Company { get; set; }

            [Display(Name = "Address")]
            [StringLength(70, ErrorMessage = "Address must be under 70 characters.")]
            public virtual string Address { get; set; }

            [Display(Name = "City")]
            [StringLength(40, ErrorMessage = "City must be under 40 characters.")]
            public virtual string City { get; set; }

            [Display(Name = "State")]
            [StringLength(40, ErrorMessage = "State must be under 40 characters.")]
            public virtual string State { get; set; }

            [Display(Name = "Country")]
            [StringLength(128, ErrorMessage = "Country Name must be under 128 characters.")]
            public virtual string Country { get; set; }

            [Display(Name = "Postal Code")]
            [StringLength(10, ErrorMessage = "Postal Code must be under 10 characters.")]
            public virtual string PostalCode { get; set; }

            [Display(Name = "Phone")]
            [StringLength(24, ErrorMessage = "Phone must be under 24 characters.")]
            public virtual string Phone { get; set; }

            [Display(Name = "Fax")]
            [StringLength(24, ErrorMessage = "Fax must be under 24 characters.")]
            public virtual string Fax { get; set; }

            [Display(Name = "Email")]
            [Required(ErrorMessage = "Email is Required.")]
            [StringLength(60, ErrorMessage = "Email must be under 60 characters.")]
            public virtual string Email { get; set; }

            [Display(Name = "Support Rep.")]
            [StringLength(60, ErrorMessage = "Support Repr. must be under 60 characters.")]
            public virtual string SupportRepresentative { get; set; }
        }

        #endregion
    }
}